import { createSlice } from "@reduxjs/toolkit";

const demoSlice = createSlice({
  name: 'demoSlice',
  initialState: {
    content: '默认数据'
  },
  reducers: {
    setContent: (state, action) => {
      state.content = action.payload
    }
  }
})

export const { setContent } = demoSlice.actions

export default demoSlice.reducer